home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 05.zip
/
BS1 part 5
/
PDraw3.0.adf
/
pdraw_rex.lzh
/
PointsMove.pdrx
< prev
next >
Wrap
Text File
|
1992-05-17
|
873b
|
53 lines
/*
@N
This Genie will move the selected points to a given position
*/
call pdm_AutoUpdate(0)
cr = '0a'x
counter = 0
do forever
point = pdm_ClickOnPoint("Click on points to be moved..")
obj = word(point, 1)
if obj = 0 then
break
else if ~pdm_isbezier(obj) then
exit_msg("Object must be made up of bezier")
counter = counter + 1
objects.counter = point
end
if counter = 0 then exit_msg()
newpos = pdm_GetClickPosn("Click on new position for first point.")
x = word(newpos,1)
y = word(newpos,2)
pnt = getpoint(word(objects.1, 1), word(objects.1, 2))
dx = x - word(pnt,1)
dy = y - word(pnt,2)
do i = 1 to counter
obj = word(objects.i, 1)
point = word(objects.i, 2)
call pdm_MovePoint(obj, point, dx, dy)
end
exit_msg()
exit_msg: procedure
do
parse arg message
if message ~= '' then call pdm_Inform(1,message,)
call pdm_AutoUpdate(1)
exit
end